﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmProveedor.aspx.cs" Inherits="PharmacyWeb.Almacen.frmProveedor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div class="row clear-fix">
        <asp:FormView ID="fvProveedores" DefaultMode="Edit" runat="server"
            ItemType="PharmacyBussinesEntities.Proveedor" Width="100%"
            SelectMethod="GetProveedor"
            UpdateMethod="UpdateProveedor"
            InsertMethod="InsertProveedor">
            <EditItemTemplate>
                <fieldset>
                    <legend>Editar Proveedor</legend>
                    <div class="form-horizontal" role="form">
                        <div class="form-group">
                            <label class="col-sm-1 control-label">ID</label>
                            <div class="col-sm-5">
                                <asp:TextBox ID="txtId"
                                    Text="<%# BindItem.Id %>"
                                    CssClass="form-control input-sm"
                                    ReadOnly="True" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label">Nombres</label>
                            <div class="col-sm-5">
                                <asp:TextBox ID="txtNombres" Text="<%# BindItem.Nombre %>"
                                    CssClass="form-control input-sm" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-1 control-label">Telefono</label>
                            <div class="col-sm-5">
                                <asp:TextBox ID="txtTelefono" Text="<%# BindItem.NumeroTelefono %>"
                                    CssClass="form-control input-sm" runat="server"></asp:TextBox>
                            </div>
                        </div>
                                                <div class="form-group">
                            <label class="col-sm-1 control-label">Descripcion</label>
                            <div class="col-sm-5">
                                <asp:TextBox ID="txtDescripcion" Text="<%# BindItem.Descripcion %>"
                                    CssClass="form-control input-sm" runat="server"></asp:TextBox>
                            </div>
                        </div>
                        <div class="form-group">
                        <div class="col-sm-offset-1 col-sm-5">
                          <asp:Button ID="btnGuardar" 
                              Text="Guardar"
                              CommandName="update"
                              CssClass="btn btn-success btn-sm" 
                              runat="server"/>
                            <a href="FrmListProveedor" class="btn btn-danger btn-sm">Cancelar</a>
                        </div>
                    </div>
                    </div>
                     <asp:ValidationSummary ID="ValidationSummary1" 
                     runat="server" 
                     ShowModelStateErrors="true" />
                </fieldset>
            </EditItemTemplate>
            <InsertItemTemplate>
                <fieldset>
                    <legend>Registrar Proveedor</legend>
                    <div class="form-horizontal" role="form">
                    <div class="form-group">
                        <label class="col-sm-1 control-label">ID</label>
                        <div class="col-sm-5">
                            <asp:TextBox ID="txtId" 
                                Text="0" 
                                ReadOnly="true"
                                CssClass="form-control input-sm" 
                                runat="server"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-1 control-label">Nombres</label>
                        <div class="col-sm-5">
                            <asp:TextBox ID="txtNombres" Text="<%# BindItem.Nombre %>" 
                                CssClass="form-control input-sm" runat="server"/>
                        </div>
                    </div>
                        <div class="form-group">
                        <label class="col-sm-1 control-label">Telefono</label>
                        <div class="col-sm-5">
                            <asp:TextBox ID="TextBox1" Text="<%# BindItem.NumeroTelefono %>" 
                                CssClass="form-control input-sm" runat="server"/>
                        </div>
                    </div>
                            <div class="form-group">
                        <label class="col-sm-1 control-label">Descripcion</label>
                        <div class="col-sm-5">
                            <asp:TextBox ID="TextBox2" Text="<%# BindItem.Descripcion %>" 
                                CssClass="form-control input-sm" runat="server"/>
                        </div>
                    </div>
                            <div class="form-group">
                        <div class="col-sm-offset-1 col-sm-5">
                          <asp:Button ID="btnGuardar" 
                              Text="Guardar"
                              CommandName="insert"
                              CssClass="btn btn-success btn-sm" 
                              runat="server"/>
                            <a href="FrmListProveedor" class="btn btn-danger btn-sm">Cancelar</a>
                        </div>
                    </div>
                        </div>
                    <asp:ValidationSummary ID="ValidationSummary1" 
                     runat="server" 
                     ShowModelStateErrors="true" />
                </fieldset>
            </InsertItemTemplate>
        </asp:FormView>
    </div>
</asp:Content>
